<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>钟表练习</title>
    <style>
        @keyframes spin{
            0%{
                transform: rotate(0);
            }
            100%{
                transform: rotate(360deg);
            }
        }
.spin{
    animation-name: spin;
            
            transition-timing-function: linear;
           
}
    #panel{
        width: 600px;
        height: 600px;
        border: solid 1px black;
        margin: 0px auto;
        background-image: url(1.jpg);
        background-position: 50% 50%;
        /* background-size: 100% 100%; */
        position: relative;
    }
    #second-point{
        width: 4px;
        height: 240px;
        background-color: red;
       
        left: 298px;
        top: 85px;
        border-top-left-radius: 50%;
        border-top-right-radius: 50%;
        animation-duration: 60s;
        transform-origin:50% 90%; 
        
    }
#minute-point{
    width: 8px;
    height: 200px;
    background-color: black;
    
    left: 296px;
    top:120px;
    border-top-left-radius: 2px;
    border-top-right-radius:2px;
    animation-duration: 3600s;
    
    transform-origin:50% 90%; 
}
.point{
    position: absolute;
    animation-iteration-count: infinite;
}
#hour-point{
    width: 10px;
    height: 160px;
    background-color: black;
    left: 295px;
    top:160px;
    border-top-left-radius: 2.5px;
    border-top-right-radius: 2.5px;
    animation-duration: 43200s;
    
    transform-origin: 50% 88%;

}
#dot{
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: black;
    border: solid 2px red;
    position: absolute;
    top: 291px;
    left: 291px;
}
    </style>
</head>
<body>
    <div id="panel">
        <div id="second-point" class="spin point"></div>
        <div id="minute-point" class="spin point"></div>
        <div id="hour-point" class="spin point"></div>
        <div id="dot"> </div>
    </div>
    <script>
    var now= new Data();
    var h= now.getHours();
    var m = now.getNumtes();
    var s =now.getSecomds();
    var delay= h*60*60+m*60+s;
    var sp = document.getElementById("secomd-point");
    var mp = document.getElementById("nimute-point");
    var hp = document.getElementById("hour-point");
    sp.style.animationDelay=-delay+"s";
    mp.style.animationDelay=-delay+"m";
    hp.style.animationDelay=-delay+"h";
    </script>
</body>
</html>